﻿using IcicleFramework.Entities;
using Microsoft.Xna.Framework;

namespace IcicleFramework.Actions.Movement
{
    public class InstantMovementAction : GameAction
    {
        public Vector2 MovementAmount { get; set; }

        public InstantMovementAction() { }

        public InstantMovementAction(InstantMovementAction old)
                : base(old)
            { }
        
        public override void Update(GameTime gameTime)
        {
            Target.Position += MovementAmount;
            Finished = true;
        }

        public override IGameAction DeepClone()
        {
            return new InstantMovementAction(this);
        }
    }
}
